﻿using Grow.Domain.Service.Core.CreateDomainService;
using Grow.Domain.Service.CreateDomainService;
using Grow.Module;
using Grow.Module.Service;

namespace Grow.Domain.Service.Core
{
    public abstract class DomainServiceCoreModuleBase : ModuleBase, IDomainServiceModule
    {
        public override ModuleLevel Level => ModuleLevel.Framework;


        public override void AddDependModule(IDependModuleBuilder dependModuleBuilder)
        {

        }

        public override void AddService(IServiceContainer serviceContainer)
        {
            CreateDomainServiceBuilder createDomainServiceBuilder = new(serviceContainer);
            CreateDomainService(createDomainServiceBuilder);
            serviceContainer.BuilderManager.SetBuilder<ICreateDomainServiceBuilder>(createDomainServiceBuilder);
        }



        public override void UseService(IServiceContext serviceContext)
        {

        }
        public abstract void CreateDomainService(ICreateDomainServiceBuilder createDomainServiceBuilder);
    }
}
